home *** CD-ROM | disk | FTP | other *** search
- Path: lasernet.com!jonathan_wooldridge
- Newsgroups: comp.lang.c++
- Message-ID: <60107174040$71C7@lasernet.com>
- X-Gateway: Act-Up 4.6 07 Jan 96 17:40:40 LaserNet, Serving Fido style systems
- Date: Sun, 7 Jan 96 13:25:45 LOC
- Organization: 1BBS ■ Imperial Beach CA ■ 619∙429∙6521/6123 ■ (52:1000/153)
- From: Jonathan Wooldridge <jonathan_wooldridge@lasernet.com>
- Subject: Spherical Distribution
-
- Let's skip the deg/radians/rads stuff and just say that the measure
- of a circle is 1, half a circle is 1/2, and a typical slice of
- pizza is 1/6 (or 1/8 depending on size preference), ok?
-
- Distributing x number of points about the circumference is easy;
- each point is 1/x-th of the way around the circle. i.e.:
-
- // Assume an array of structures that contain an angle element
-
- for (int thisPoint = 0; thisPoint < NumPoints; thisPoint++)
- point[thisPoint].angle = 1/thisPoint; // angle as a fraction
-
-
- So much for 2D flatworld. Now, my question is this:
- Is there a way to distribute x number of points evenly across
- the surface of a sphere?
-
- -=| SpyroGyra |=-
- ... "Life is tough. It's tougher when you're stupid." - John Wayne
- -!-
- * TLX v4.00 *
-
- ---
-